home *** CD-ROM | disk | FTP | other *** search
/ Enter 2003 July / EnterCD 7_2003.iso / Ekstra / GL Force 2001 3.0 / MainFrm.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2002-02-07  |  1.9 KB  |  91 lines

  1. /*
  2. Authors: David Nishimoto
  3. Website: http://www.listensoftware.com
  4. Email: davepamn@relia.net
  5. Program: Force
  6. */
  7.  
  8. #include "stdafx.h"
  9. #include "3DFont.h"
  10.  
  11. #include "MainFrm.h"
  12.  
  13. #ifdef _DEBUG
  14. #define new DEBUG_NEW
  15. #undef THIS_FILE
  16. static char THIS_FILE[] = __FILE__;
  17. #endif
  18.  
  19. /////////////////////////////////////////////////////////////////////////////
  20. // CMainFrame
  21.  
  22. IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
  23.  
  24. BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
  25.     //{{AFX_MSG_MAP(CMainFrame)
  26.     ON_WM_QUERYNEWPALETTE()
  27.     ON_WM_PALETTECHANGED()
  28.     //}}AFX_MSG_MAP
  29. END_MESSAGE_MAP()
  30.  
  31. /////////////////////////////////////////////////////////////////////////////
  32. // CMainFrame construction/destruction
  33.  
  34. CMainFrame::CMainFrame()
  35. {
  36.     // TODO: add member initialization code here
  37.     
  38. }
  39.  
  40. CMainFrame::~CMainFrame()
  41. {
  42. }
  43.  
  44. BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
  45. {
  46.     // TODO: Modify the Window class or styles here by modifying
  47.     //  the CREATESTRUCT cs
  48.  
  49.     return CFrameWnd::PreCreateWindow(cs);
  50. }
  51.  
  52. /////////////////////////////////////////////////////////////////////////////
  53. // CMainFrame diagnostics
  54.  
  55. #ifdef _DEBUG
  56. void CMainFrame::AssertValid() const
  57. {
  58.     CFrameWnd::AssertValid();
  59. }
  60.  
  61. void CMainFrame::Dump(CDumpContext& dc) const
  62. {
  63.     CFrameWnd::Dump(dc);
  64. }
  65.  
  66. #endif //_DEBUG
  67.  
  68. /////////////////////////////////////////////////////////////////////////////
  69. // CMainFrame message handlers
  70.  
  71. BOOL CMainFrame::OnQueryNewPalette() 
  72. {
  73.     // TODO: Add your message handler code here and/or call default
  74.     CView* pView = GetActiveView();
  75.     pView->Invalidate(FALSE); 
  76.  
  77.     return CFrameWnd::OnQueryNewPalette();
  78. }
  79.  
  80. void CMainFrame::OnPaletteChanged(CWnd* pFocusWnd) 
  81. {
  82.     CFrameWnd::OnPaletteChanged(pFocusWnd);
  83.     
  84.     // TODO: Add your message handler code here
  85.     CView* pView = GetActiveView();
  86.     if(pFocusWnd != pView) 
  87.         pView->Invalidate(FALSE); 
  88. }
  89.  
  90.  
  91.